package com.wthfeng.democlient.config;

import com.wthfeng.democlient.service.BusinessService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartHttpServletRequest;

import javax.servlet.http.HttpServletRequest;

@RestController
public class Controller {
    @Autowired
    private BusinessService businessService;

    @GetMapping("test")
    public  String test(){
        businessService.testHello("wy");
        return "1231341";
    }

    @PostMapping("test2")
    public  void test2(HttpServletRequest request, @RequestBody Object chunk){
        System.out.println("test");
        MultipartHttpServletRequest multipartHttpServletRequest=(MultipartHttpServletRequest)request;
    }
}
